package com.konsung.ksdc.bean.netbean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * 售后详细信息bean
 * Created by Administrator on 2016/3/24 0024.
 */
public class SaleServiceNetBean implements Parcelable {
    public static final String STATUS_UNDISPOSED = "1"; // 未处理
    public static final String STATUS_DISPOSING = "2"; // 处理中
    public static final String STATUS_DISPOSED = "3"; // 服务器端已解决
    public static final String STATUS_USER_CONFIRM = "4"; // 客户端确认解决
    public static final String STATUS_CLOSED = "5"; // 已评价关闭

    private String id;
    /**
     * 1. [不可空] 主键
     */

    private String requestEmpId;
    /**
     * 2. [不可空] 申请用户主键
     */

    private RegisterEmpNetBean empDto; // 账号bean

    private MachineNetBean macDto; // 关联的一体机信息bean

    private String requestMacId;
    /**
     * 3. [不可空] 申请机器
     */

    private String serviceContent;
    /**
     * 4. [不可空] 描述信息
     */

    private String createDate;
    /**
     * 5. [不可空] 申请时间
     */

    private String picPath;
    /**
     * 6. [不可空] 图片名称
     */

    private String serviceState;
    /**
     * 7. 处理状态
     */

    private List<ReplyNetBean> replies; // 售后回复集合

    private String isReply; // 售后消息回复标示 Y-是,N-否

    @Override
    public String toString() {
        return "SaleServiceNetBean{" +
                "id='" + id + '\'' +
                ", requestEmpId='" + requestEmpId + '\'' +
                ", empNetBean=" + empDto +
                ", machineNetBean=" + macDto +
                ", requestMacId='" + requestMacId + '\'' +
                ", serviceContent='" + serviceContent + '\'' +
                ", createDate='" + createDate + '\'' +
                ", picPath='" + picPath + '\'' +
                ", serviceState='" + serviceState + '\'' +
                ", replies=" + replies + '\'' +
                ", isReply=" + isReply +
                '}';
    }

    /**
     * 获取售后bean的id
     * @return 售后bean的id
     */
    public String getId() {
        return id;
    }

    /**
     * 设置售后bean的id
     * @param id 售后bean的id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取用户主键
     * @return 用户主键
     */
    public String getRequestEmpId() {
        return requestEmpId;
    }

    /**
     * 设置用户主键
     * @param requestEmpId 用户主键
     */
    public void setRequestEmpId(String requestEmpId) {
        this.requestEmpId = requestEmpId;
    }

    /**
     * 获取申请的机器id
     * @return 申请的机器id
     */
    public String getRequestMacId() {
        return requestMacId;
    }

    /**
     * 设置申请的机器id
     * @param requestMacId 申请的机器id
     */
    public void setRequestMacId(String requestMacId) {
        this.requestMacId = requestMacId;
    }

    /**
     * 获取售后描述信息
     * @return 售后描述信息
     */
    public String getServiceContent() {
        return serviceContent;
    }

    /**
     * 设置售后描述信息
     * @param serviceContent 售后描述信息
     */
    public void setServiceContent(String serviceContent) {
        this.serviceContent = serviceContent;
    }

    /**
     * 获取申请售后提交时间
     * @return 申请售后提交时间
     */
    public String getCreateDate() {
        return createDate;
    }

    /**
     * 设置申请售后提交时间
     * @param createDate 申请售后提交时间
     */
    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    /**
     * 获取售后提交图片路径
     * @return 售后提交图片路径
     */
    public String getPicPath() {
        return picPath;
    }

    /**
     * 设置售后提交图片路径
     * @param picPath 售后提交图片路径
     */
    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }

    /**
     * 获取售后状态
     * @return 售后状态
     */
    public String getServiceState() {
        return serviceState;
    }

    /**
     * 设置售后状态
     * @param serviceState 售后状态
     */
    public void setServiceState(String serviceState) {
        this.serviceState = serviceState;
    }

    /**
     * 获取售后回复信息集合
     * @return 售后回复信息集合
     */
    public List<ReplyNetBean> getReplies() {
        return replies;
    }

    /**
     * 设置售后回复信息集合
     * @param replies 售后回复信息集合
     */
    public void setReplies(List<ReplyNetBean> replies) {
        this.replies = replies;
    }

    /**
     * 获取账号注册bean
     * @return 账号注册bean
     */
    public RegisterEmpNetBean getEmpDto() {
        return empDto;
    }

    /**
     * 设置账号注册bean
     * @param empDto 账号注册bean
     */
    public void setEmpDto(RegisterEmpNetBean empDto) {
        this.empDto = empDto;
    }

    /**
     * 获取关联的一体机信息bean
     * @return 关联的一体机信息bean
     */
    public MachineNetBean getMacDto() {
        return macDto;
    }

    /**
     * 设置关联的一体机信息bean
     * @param macDto 关联的一体机信息bean
     */
    public void setMacDto(MachineNetBean macDto) {
        this.macDto = macDto;
    }

    /**
     * 获取售后是否有新的回复状态
     * @return 售后是否有新的回复 "Y"代表有新的回复未查看
     */
    public String getIsReply() {
        return isReply;
    }

    /**
     * 设置售后是否有新的回复状态
     * @param isReply 售后是否有新的回复 "Y"代表有新的回复未查看
     */
    public void setIsReply(String isReply) {
        this.isReply = isReply;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.requestEmpId);
        dest.writeParcelable(this.empDto, flags);
        dest.writeParcelable(this.macDto, flags);
        dest.writeString(this.requestMacId);
        dest.writeString(this.serviceContent);
        dest.writeString(this.createDate);
        dest.writeString(this.picPath);
        dest.writeString(this.serviceState);
        dest.writeList(this.replies);
        dest.writeString(this.isReply);
    }

    /**
     * 序列化实体类对象
     * @param in Parcel对象
     */
    protected SaleServiceNetBean(Parcel in) {
        this.id = in.readString();
        this.requestEmpId = in.readString();
        this.empDto = in.readParcelable(RegisterEmpNetBean.class
                .getClassLoader());
        this.macDto = in.readParcelable(MachineNetBean.class.getClassLoader());
        this.requestMacId = in.readString();
        this.serviceContent = in.readString();
        this.createDate = in.readString();
        this.picPath = in.readString();
        this.serviceState = in.readString();
        this.replies = new ArrayList<ReplyNetBean>();
        in.readList(this.replies, ReplyNetBean.class.getClassLoader());
        this.isReply = in.readString();
    }

    public static final Creator<SaleServiceNetBean> CREATOR = new
            Creator<SaleServiceNetBean>() {
                @Override
                public SaleServiceNetBean createFromParcel(Parcel source) {
                    return new SaleServiceNetBean(source);
                }

                @Override
                public SaleServiceNetBean[] newArray(int size) {
                    return new SaleServiceNetBean[size];
                }
            };
}
